require_once('./Include/system.inc');
if(isset($_REQUEST[strArticleUrl]))
{
$article = mysql_query("select * from articles where strArticleUrl regexp '^\/?$_REQUEST[strArticleUrl]\/?\$'");
if($article = mysql_fetch_assoc($article))
{
ob_start();
if(strlen($article[strArticleHeading]) > 0)
$strArticleHeading = $article[strArticleHeading];
if(strlen($article[strArticleTitle]) > 0)
$strTitle = $article[strArticleTitle];
else
$strTitle = substr($strArticleHeading, 0, 39);
$strTitle = "$strTitle";
if(strlen($article[strArticleContent]) > 0)
echo $article[strArticleContent];
if(strlen($article[strArticleDescription]) > 0)
$aMeta[desc] = $article[strArticleDescription];
if(strlen($article[strArticleKeywords]) > 0)
$aMeta[keywords] = $article[strArticleKeywords];
$children = mysql_query("select * from articles where strArticleUrl not regexp '\.html\$' and strArticleUrl regexp '^" . str_replace('/', '\/', $_REQUEST[strArticleUrl]) . "\/?[^\/]+\/?\$'");
while($child_category = mysql_fetch_assoc($children))
{
?>
}
if($_REQUEST[strArticleUrl] != '') {
$articles = mysql_query("select * from articles where strArticleUrl != '$_REQUEST[strArticleUrl]' and strArticleUrl regexp '^" . str_replace('/', '\/', (preg_match("/\.html\$/", $_REQUEST[strArticleUrl]) ? dirname($_REQUEST[strArticleUrl]) : $_REQUEST[strArticleUrl])) . "\/?[^\/]+\.html\$'");
while($child_article = mysql_fetch_assoc($articles))
{
$nav_articles[] = $child_article;
}
if(count($nav_articles))
$nav_articles_heading = preg_match("/\.html\$/", $_REQUEST[strArticleUrl]) ? "Related Topics" : $article[strArticleName];
}
do
{
if(!isset($parent))
$parent = $_REQUEST[strArticleUrl];
if(!empty($parent) && ($item = mysql_fetch_assoc(mysql_query("select * from articles where strArticleUrl regexp '^" . str_replace('/', '\/', $parent) . "\/?\$'"))))
{
$breadcrumb[] = $item[strArticleUrl] != $_REQUEST[strArticleUrl] ? "$item[strArticleName]" : "$item[strArticleName]";
}
}
while(($parent != dirname($parent)) && (dirname($parent) != ".") && ($parent = dirname($parent)));
$breadcrumb[] = "Home";
$breadcrumb = array_reverse($breadcrumb);
if(!empty($article[strArticleBottomContent])) {
?>
if(!empty($article[strArticleBottomHeading])): ?>
=$article[strArticleBottomHeading]?>
endif ?>
=$article[strArticleBottomContent]?>
}
$strArticleContent = ob_get_clean();
}
elseif(mysql_num_rows($articles = mysql_query("select * from articles where strArticleUrl regexp '^\/?$_REQUEST[strArticleUrl]\/?[^\/]+\/?'")))
{
ob_start();
$strArticleHeading = $strTitle = ucwords(strtolower(implode(" ", explode("/", $_REQUEST[strArticleUrl]))));
echo "";
$strArticleContent = ob_get_clean();
}
else include("404.html");
}
else include("404.html");
?>
include( './Include/header.inc'); ?>
include( './Include/footer.inc'); ?>